package com.example.listener;

import jakarta.servlet.ServletContext;
import jakarta.servlet.ServletContextEvent;
import jakarta.servlet.ServletContextListener;

/**
 * @Author 游家纨绔
 * @Description TODO
 * @Create 2023-09-07 21:00
 */
public class SecKillListener implements ServletContextListener {

	// 服务器初始化时调用
	@Override
	public void contextInitialized(ServletContextEvent sce) {
		ServletContext sct = sce.getServletContext();
		// sct.setAttribute("date", );
		System.out.println("======listener test is beginning=========");
		// ServletContextListener.super.contextInitialized(sce);
	}

	// 服务器销毁时调用
	@Override
	public void contextDestroyed(ServletContextEvent sce) {
		ServletContextListener.super.contextDestroyed(sce);
	}

}
